package com.siwei.mes.mapper;

import com.siwei.mes.common.base.BaseMapper;
import com.siwei.mes.entity.ExperimentSampleSmoke;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 试验台账抽样(ExperimentSampleSmoke)表数据库访问层
 *
 * @author linzi
 * @since 2023-12-28 20:47:32
 */
public interface ExperimentSampleSmokeMapper extends BaseMapper<ExperimentSampleSmoke> {
    /**
     * 获取所有
     *
     * @param entity
     * @return
     */
    List<ExperimentSampleSmoke> getList(ExperimentSampleSmoke entity);

    /**
     * 根据id获取
     *
     * @param id
     * @return
     */
    ExperimentSampleSmoke loadById(@Param("id") Long id);

    /**
     * 根据试验台账id修改所有抽样记录为已完成
     *
     * @param experimentId
     */
    void updateIsFinish(@Param("experimentId") Long experimentId);

    /**
     * 根据试验台账id获取信息
     *
     * @param experimentId
     */
    List<ExperimentSampleSmoke> selectByExperimentId(@Param("experimentId") Long experimentId);
}
